package collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo1 {
    public static void main(String[] args) {

        Collection c = new ArrayList();
        c.add("A");
        c.add("B");
        c.add("C");
        c.add("D");

        System.out.println(c);
        System.out.println(c.size());
        System.out.println(c.isEmpty());

        c.clear();
        System.out.println("清空集合");

        System.out.println(c);
        System.out.println(c.size());
        System.out.println(c.isEmpty());

        System.out.println(c.size());
        System.out.println(c.isEmpty());
        System.out.println(c.size());

        c.clear();
        c.clear();

    }
}
